package com.example.smallandroidcodetester;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class DialogFactory {
	public static final void showInfo(final Context ctx, final String error) {
		if (ctx == null)
			return;
		AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
		builder.setIcon(android.R.drawable.ic_dialog_info).setMessage(error).setTitle("Info");
		builder.setNegativeButton("OK", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				dialog.dismiss();
			}
		}).show();
	}
}
